Hidden Cave Wikia:Chat/Logs/26 April 2016
11:57 YAY window cleared 11:58 yaay we're both logging so we're gonna create duplicates lmao 11:58 :n 11:58 I like 24h system more. 11:58 24h? 11:58 Oh right, 23:59:59? 11:59 Yes. 11:59 am/pm suck :v 11:59 :v tru 11:59 Metric system, celsuis and 24h time system ftw :V 23:54:11 CHAT Dorumin: I need to create the if ( kickmsg '' ) kickmsg '.* has been kicked by .*' 23:54:22 CHAT Dorumin: (does that make any sense) 23:55:12 CHAT SapphireBot: (not really) 23:55:22 CHAT Dorumin: Hmm.. 23:55:31 CHAT SapphireBot: (I'm just dumb, that's all) 23:56:11 CHAT Dorumin: nah dw :0 23:56:19 CHAT Dorumin: I'll just see if it works, just a sec... 23:57:18 CHAT SapphireBot: YAY window cleared 23:58:03 CHAT Dorumin: yaay we're both logging so we're gonna create duplicates lmao 23:58:11 CHAT Dorumin: :n 23:58:12 CHAT SapphireBot: I like 24h system more. 23:58:20 CHAT Dorumin: 24h? 23:58:44 CHAT Dorumin: Oh right, 23:59:59? 23:59:03 CHAT SapphireBot: Yes. 23:59:09 CHAT SapphireBot: am/pm suck :v 23:59:17 CHAT Dorumin: :v tru 23:59:49 CHAT SapphireBot: Metric system, celsuis and 24h time system ftw :V 00:00:14 CHAT SapphireBot: Btw 00:00:15 CHAT Dorumin: So basically down w/ americans? 00:00:21 CHAT Dorumin: :b 00:00:39 CHAT SapphireBot: skinda. It's not my fault that they are the only ones who use it 00:00:54 CHAT SapphireBot: s+1 or 2 tiny countries 00:01:12 CHAT SapphireBot: I mean all of the things I counted 00:01:19 CHAT SapphireBot: So anyway 00:01:40 CHAT SapphireBot: Does the current logging script use mediawiki messages too? 00:01:50 CHAT Dorumin: Yeah 00:01:53 CHAT Dorumin: Wait no 00:02:00 CHAT Dorumin: it doesn't log inline alerts 00:02:12 CHAT Dorumin: so no kicks, bans, leaves, or joins 00:02:34 CHAT SapphireBot: But it still overloads the stack 00:02:43 CHAT SapphireBot: sor whatever the lag reason is 00:02:58 CHAT Dorumin: Yeah 00:03:13 CHAT Dorumin: actually no idea what you mean by stack but I guess you mean what breaks everything 00:03:14 CHAT Dorumin: well 00:03:23 CHAT Dorumin: that script searched for all .message elements 00:03:35 CHAT Dorumin: then looked for their closest .time 00:03:45 CHAT Dorumin: then somehow merged them together to create the huge mess that is the logs 12:00 Btw 12:00 So basically down w/ americans? 12:00 :b 12:00 kinda. It's not my fault that they are the only ones who use it 12:00 +1 or 2 tiny countries 12:01 I mean all of the things I counted 12:01 So anyway 12:01 Does the current logging script use mediawiki messages too? 12:01 Yeah 12:01 Wait no 12:02 it doesn't log inline alerts 12:02 so no kicks, bans, leaves, or joins 12:02 But it still overloads the stack 12:02 or whatever the lag reason is 12:02 Yeah 12:03 actually no idea what you mean by stack but I guess you mean what breaks everything 12:03 well 12:03 that script searched for all .message elements 12:03 then looked for their closest .time 12:03 then somehow merged them together to create the huge mess that is the logs 12:03 however this one grabs the message text as-they-go 12:04 and saves them on a variable 12:04 (and it grabs [s] not ) 12:04 Hm... 12:04 Through api? 12:05 through api what? 12:05 it only gets the mediawiki messages through api :0 12:05 Well again. 12:05 MESSAGE 12:05 it uses a built-in chat function :b 12:06 :0000 12:06 mainRoom.model.chats.bind('afteradd', function(chat) { 12:06 chat.attributes.text; 12:06 }); 00:04:03 CHAT Dorumin: and saves them on a variable 00:04:24 CHAT Dorumin: (and it grabs [s] not ) 00:04:39 CHAT SapphireBot: Hm... 00:04:48 CHAT SapphireBot: Through api? 00:05:10 CHAT Dorumin: through api what? 00:05:13 CHAT Dorumin: it only gets the mediawiki messages through api :0 00:05:30 CHAT SapphireBot: Well again. 00:05:39 CHAT SapphireBot: MESSAGE 00:05:54 CHAT Dorumin: it uses a built-in chat function :b 00:06:04 CHAT SapphireBot: :0000 00:06:18 CHAT Dorumin: mainRoom.model.chats.bind('afteradd', function(chat) { chat.attributes.text; }); 00:06:39 CHAT Dorumin: chat.attributes.text message raw code before you press enter 00:06:49 CHAT SapphireBot: Aha 00:06:53 CHAT Dorumin: just that it grabs everyone's messages '2' 00:06:54 CHAT Dorumin: '3' 00:07:06 CHAT SapphireBot: and where you get the timestamp? 00:07:24 CHAT Dorumin: https://gyazo.com/e7ebac8cf118283f095dcba34bf14a17 00:07:25 CHAT Dorumin: Ahhh 00:07:30 CHAT Dorumin: that's one of my favorite parts 00:08:09 CHAT Dorumin: each time you get a new message it does this: var msgDate = new Date(); '+ (msgDate.getUTCHours() < 10 ? '0' : '') + msgDate.getUTCHours() + ':' + (msgDate.getUTCMinutes() < 10 ? '0' : '') + msgDate.getUTCMinutes() + ':' + (msgDate.getUTCSeconds() < 10 ? '0' : '') + msgDate.getUTCSeconds() + '' 00:08:37 CHAT Dorumin: basically, it gets the time, and if its only 1 digit then it adds a 0 on the front of it 00:08:44 CHAT Dorumin: UTC time* 00:09:16 CHAT SapphireBot: Understood 00:09:19 CHAT SapphireBot: Btw 00:09:27 CHAT SapphireBot: if there are 50 messages 00:09:35 CHAT SapphireBot: Where do you save them all? 00:09:50 CHAT Dorumin: I save them all on a variable called logText 00:09:55 CHAT Dorumin: (or I think it was logText 00:10:16 CHAT Dorumin: https://gyazo.com/c38fd091a6a663416b0952de5c36814b 00:10:21 CHAT Dorumin: it was logText. 00:11:18 CHAT SapphireBot: :v 00:11:32 CHAT Dorumin: Yeppp 00:11:39 CHAT Dorumin: this is what I do: 00:11:51 CHAT Dorumin: it uses an API to get the content of the page for the logs 00:11:57 CHAT SapphireBot: replace the closing tag with the variable 00:12:05 CHAT Dorumin: yes 00:12:05 CHAT Dorumin: lmao 00:12:17 CHAT SapphireBot: Ah well 00:12:36 CHAT SapphireBot: what was the old code doing with those 50 messages? 00:13:03 CHAT Dorumin: and if the page isn't created it just makes the page be ' ' + logText + '\nCategory:Wikia Chat L[[ogs]]' 00:13:10 CHAT Dorumin: Hmm 00:13:22 CHAT Dorumin: the old code didn't do anything with them while they came in 00:13:35 CHAT Dorumin: it just grabbed all of them when it had to log 00:13:45 CHAT Dorumin: (and their corresponding times) 12:06 chat.attributes.text message raw code before you press enter 12:06 Aha 12:06 just that it grabs everyone's messages '2' 12:06 '3' 12:07 and where you get the timestamp? 12:07 https://gyazo.com/e7ebac8cf118283f095dcba34bf14a17 12:07 Ahhh 12:07 that's one of my favorite parts 12:08 each time you get a new message it does this: 12:08 var msgDate = new Date(); 12:08 '+ (msgDate.getUTCHours() < 10 ? '0' : '') + msgDate.getUTCHours() + ':' + (msgDate.getUTCMinutes() < 10 ? '0' : '') + msgDate.getUTCMinutes() + ':' + (msgDate.getUTCSeconds() < 10 ? '0' : '') + msgDate.getUTCSeconds() + '' 12:08 basically, it gets the time, and if its only 1 digit then it adds a 0 on the front of it 12:08 UTC time* 12:09 Understood 12:09 Btw 12:09 if there are 50 messages 12:09 Where do you save them all? 12:09 I save them all on a variable called logText 12:09 (or I think it was logText 12:10 https://gyazo.com/c38fd091a6a663416b0952de5c36814b 12:10 it was logText. 12:11 :v 12:11 Yeppp 12:11 this is what I do: 12:11 it uses an API to get the content of the page for the logs 12:11 replace the closing tag with the variable 12:12 yes 12:12 lmao 12:12 Ah well 12:12 what was the old code doing with those 50 messages? 12:13 and if the page isn't created it just makes the page be ' ' + logText + '\nCategory:Wikia Chat L[[ogs]]' 12:13 Hmm 12:13 the old code didn't do anything with them while they came in 12:13 it just grabbed all of them when it had to log 12:13 (and their corresponding times) 12:14 And saved them in the variable as well 12:14 yeah 12:14 (it was the best way to do it back then) 12:14 (chat was really beta in that time :v) 12:15 I got 32 JS errors since joining this chat 12:16 the SU wiki chat tab has 258 2016 04 26